import java.applet.Applet; import java.awt.*; class MyFrame extends Frame { public MyFrame() { String arr[]={"Monospaced","TimesRoman","Helvetica"}; setLayout(new GridLayout(arr.length,1,10,10)); for(int i=0;i<arr.length;i++) { Button btn=new Button(arr[i]); add(btn); Font fnt=new Font(arr[i],Font.PLAIN,50); btn.setFont(fnt); } } } class demo { public static void main(String argvs[]) { MyFrame frm=new MyFrame(); frm.setSize(400,300); frm.setVisible(true); } }